﻿using BarManager.Core.Common;
using System;
using System.Collections;
using System.Collections.Generic;
using System.Text.RegularExpressions;
using System.Web;

namespace BarManager.UI.Web.Caching
{
    public static class CacheManager
    {       
       
        public static T Get<T>(string key)
        {
            return (T)HttpContext.Current.Session[key];
        }

        public static void Set(string key, object data)
        {
            HttpContext.Current.Session[key] = data;
        }

        public static bool IsSet(string key)
        {
            return (HttpContext.Current.Session[key] != null);
        }

        public static void Clear()
        {
            HttpContext.Current.Session.Clear();
        }
    }
}